﻿using System;

using mvcForum.Core;
using mvcForum.Core.Interfaces;
using mvcForum.Core.Interfaces.Data;

namespace mvcForum.AddOns.MultiPost {

	public class MultiPostInstall : IInstallable {
		private readonly IRepository<AddOnConfiguration> configRepo;

		public MultiPostInstall(IRepository<AddOnConfiguration> configRepo) {
			this.configRepo = configRepo;
		}

		public void Install() {
			MultiPostConfiguration config = new MultiPostConfiguration(this.configRepo);
			config.Enabled = true;
			config.Interval = 2;
			config.Posts = 5;
			config.RunAsynchronously = false;
		}
	}
}